<?php
namespace app\admin\validate;
use think\Validate;
class Category extends Validate{
    protected $rule = [
        'pid'=>'require|number',
        'name'=>'require'
    ];
    protected $message=[
        'pid.require'=>'父id必须填写',
        'pid.number'=>'父id必须为数字',
        'name.require'=>'分类名称必须填写',
    ];
}